<?php
    $id = $_GET['recId'];
    $valor = str_replace('.', ',', $_GET['valor']);
    $nome = $_GET['nome'];
    $despesa = $_GET['despesa'];

    function mes($mes) {
        if($mes == 1)
          return "Janeiro";
        else if($mes == 2)
          return "Fevereiro";
        else if($mes == 3)
          return "Mar&ccedil;o";
        else if($mes == 4)
          return "Abril";
        else if($mes == 5)
          return "Maio";
        else if($mes == 6)
          return "Junho";
        else if($mes == 7)
          return "Julho";
        else if($mes == 8)
          return "Agosto";
        else if($mes == 9)
          return "Setembro";
        else if($mes == 10)
          return "Outubro";
        else if($mes == 11)
          return "Novembro";
        else if($mes == 12)
          return "Dezembro";
    }
?>
<html>
    <head>
        <meta http-equiv=Content-Type content="text/html; charset=windows-1252">
        <meta name=Generator content="Microsoft Word 11 (filtered)">
        <title>Recibo</title>
        <style>
            <!--
             /* Font Definitions */
             @font-face
                    {font-family:"MS Mincho";
                    panose-1:2 2 6 9 4 2 5 8 3 4;}
             @font-face
                    {font-family:"\@MS Mincho";
                    panose-1:2 2 6 9 4 2 5 8 3 4;}
             /* Style Definitions */
             p.MsoNormal, li.MsoNormal, div.MsoNormal
                    {margin:0cm;
                    margin-bottom:.0001pt;
                    font-size:12.0pt;
                    font-family:"Times New Roman";}
             @page Section1
                    {size:595.3pt 841.9pt;
                    margin:70.85pt 64.3pt 70.85pt 63.0pt;}
             div.Section1
                    {page:Section1;}
            -->
        </style>
    </head>

    <body lang=PT-BR>
        <div class=Section1>
<?php for($i=0; $i<2; $i++) { ?>
            <div align=center>
                <table class=MsoTableGrid border=0 cellspacing=0 cellpadding=0  style='border-collapse:collapse'>
                    <tr>
                        <td width=153 valign=top style='width:114.5pt;padding:0cm 5.4pt 0cm 5.4pt'>
                            <p class=MsoNormal align=center style='text-align:center'>
                                <img src="../imagens/logotipo.jpg">
                            </p>
                            <p class=MsoNormal align=center style='text-align:center'>
                                <b><span style='font-size:10.0pt'>&nbsp;</span></b>
                            </p>
                            <p class=MsoNormal align=center style='text-align:center'>
                                <?php if($i == 0) { ?>
                                  <b><span style='font-size:10.0pt'>1&ordf; via paciente</span></b>
                                <?php } else { ?>
                                  <b><span style='font-size:10.0pt'>2&ordf; via liga</span></b>  
                                <?php } ?>
                            </p>
                        </td>
                        <td width=372 valign=top style='width:279.0pt;padding:0cm 5.4pt 0cm 5.4pt'>
                            <p class=MsoNormal align=center style='text-align:center'>
                                <b><span style='font-size:9.0pt'>LIGA FEMINIA DE COMBATE AO C&Acirc;NCER DE VERA CRUZ </span></b>
                            </p>
                            <p class=MsoNormal align=center style='text-align:center'>
                                <b><span style='font-size:9.0pt'>CNPJ: 04.234.206/0001-37 Inscr. Est. Isento</span></b>
                            </p>
                            <p class=MsoNormal align=center style='text-align:center'>
                                <b><span style='font-size:9.0pt'>UTILID. PUBLICA FEDERAL PORTARIA 2.723 29/09/2004</span></b>
                            </p>
                            <p class=MsoNormal align=center style='text-align:center'>
                                <b><span style='font-size:9.0pt'>RUA ROBERTO GRUENDLING 125 - CENTRO</span></b>
                            </p>
                            <p class=MsoNormal align=center style='text-align:center'>
                                <b><span style='font-size:9.0pt'>96.800.000 - VERA CRUZ - RS</span></b>
                            </p>
                        </td>
                        <td width=109 valign=top style='width:82.05pt;padding:0cm 5.4pt 0cm 5.4pt'>
                            <p class=MsoNormal align=center style='text-align:center'>
                                <b><span style='font-size:13.0pt'>RECIBO</span></b>
                            </p>
                            <p class=MsoNormal align=center style='text-align:center'>
                                <b><span style='font-size:13.0pt'>n. <?=$id?></span></b>
                            </p>
                            <p class=MsoNormal align=center style='text-align:center'>
                                <b><span style='font-size:13.0pt'>R$ (<?=$valor?>)</span></b>
                            </p>
                        </td>
                    </tr>
                </table>
            </div>

            <p class=MsoNormal align=center style='text-align:center'><b>&nbsp;</b></p>
            <p class=MsoNormal align=center style='text-align:center'><b>&nbsp;</b></p>

            <div align=center>
                <table class=MsoTableGrid border=0 cellspacing=0 cellpadding=0 style='border-collapse:collapse'>
                    <tr>
                        <td width=213 valign=top style='width:159.5pt;padding:0cm 5.4pt 0cm 5.4pt'>
                            <p class=MsoNormal align=right style='text-align:right'><b>Pagamos &agrave;</b></p>
                        </td>
                        <td width=420 valign=top style='width:315.0pt;background:#cccccc;padding:0cm 5.4pt 0cm 5.4pt'>
                            <p class=MsoNormal><b><?=$nome?></b></p>
                        </td>
                    </tr>
                </table>
            </div>

            <p class=MsoNormal align=center style='text-align:center'>&nbsp;</p>

            <div align=center>
                <table class=MsoTableGrid border=0 cellspacing=0 cellpadding=0 style='border-collapse:collapse'>
                    <tr>
                        <td width=213 valign=top style='width:159.5pt;padding:0cm 5.4pt 0cm 5.4pt'>
                            <p class=MsoNormal align=right style='text-align:right'>
                                <b>a import&acirc;ncia de</b>
                            </p>
                        </td>
                        <td width=421 valign=top style='width:315.0pt;background:#cccccc;padding:0cm 5.4pt 0cm 5.4pt'>
                            <p class=MsoNormal>
                                <b>R$<?=$valor?></b>
                            </p>
                        </td>
                    </tr>
                </table>
            </div>

            <p class=MsoNormal align=center style='text-align:center'>&nbsp;</p>

            <div align=center>
                <table class=MsoTableGrid border=0 cellspacing=0 cellpadding=0 style='border-collapse:collapse'>
                    <tr>
                        <td width=213 valign=top style='width:159.5pt;padding:0cm 5.4pt 0cm 5.4pt'>
                            <p class=MsoNormal align=right style='text-align:right'>
                                <b>Referente</b>
                            </p>
                        </td>
                        <td width=421 valign=top style='width:315.0pt;background:#cccccc;padding:0cm 5.4pt 0cm 5.4pt'>
                            <p class=MsoNormal>
                                <b><?=$despesa?></b>
                            </p>
                        </td>
                    </tr>
                </table>
            </div>

            <p class=MsoNormal align=center style='text-align:center'>&nbsp;</p>
            <p class=MsoNormal align=center style='text-align:center'>&nbsp;</p>

            <div align=center>
                <table class=MsoTableGrid border=0 cellspacing=0 cellpadding=0 style='border-collapse:collapse'>
                    <tr>
                        <td width=317 valign=top style='width:237.5pt;padding:0cm 5.4pt 0cm 5.4pt'>
                            <p class=MsoNormal align=center style='text-align:center'>&nbsp;</p>
                        </td>
                        <td width=317 valign=top style='width:237.5pt;padding:0cm 5.4pt 0cm 5.4pt'>
                            <p class=MsoNormal align=right style='text-align:right'>
                                <b><span style='font-size:10.0pt'>Vera Cruz, <?= date('d') . " de " . mes(date('m')) . " de " . date('Y');?></span></b>
                            </p>
                        </td>
                    </tr>
                </table>
            </div>

            <p class=MsoNormal align=center style='text-align:center'>&nbsp;</p>
            <p class=MsoNormal align=center style='text-align:center'>&nbsp;</p>
            <p class=MsoNormal align=center style='text-align:center'>&nbsp;</p>

            <div align=center>
                <table class=MsoTableGrid border=0 cellspacing=0 cellpadding=0 style='border-collapse:collapse'>
                    <tr>
                        <td width=317 valign=top style='width:237.5pt;padding:0cm 5.4pt 0cm 5.4pt'>
                            <p class=MsoNormal align=center style='text-align:center'><b>_________________________________</b></p>
                        </td>
                        <td width=317 valign=top style='width:237.5pt;padding:0cm 5.4pt 0cm 5.4pt'>
                            <p class=MsoNormal align=center style='text-align:center'><b>_________________________________</b></p>
                        </td>
                    </tr>
                    <tr>
                        <td width=317 valign=top style='width:237.5pt;padding:0cm 5.4pt 0cm 5.4pt'>
                            <p class=MsoNormal align=center style='text-align:center'><b>Paciente ou Respons&aacute;vel</b></p>
                        </td>
                        <td width=317 valign=top style='width:237.5pt;padding:0cm 5.4pt 0cm 5.4pt'>
                            <p class=MsoNormal align=center style='text-align:center'><b>Respons&aacute;vel (Liga)</b></p>
                        </td>
                    </tr>
                </table>
            </div>
<?php if($i == 0) {?>
            <p class=MsoNormal align=center style='text-align:center'>&nbsp;</p>
            <p class=MsoNormal align=center style='text-align:center'>&nbsp;</p>
            <p class=MsoNormal align=center style='text-align:center'>&nbsp;</p>
            <center><p style="border-bottom: 1px dotted #000000; width: 750px;"></p></center>
            <p class=MsoNormal align=center style='text-align:center'>&nbsp;</p>
            <p class=MsoNormal align=center style='text-align:center'>&nbsp;</p>
            <p class=MsoNormal align=center style='text-align:center'>&nbsp;</p>
<?php }}?>
        </div>
    </body>
</html>
